angular.module('inventory.router', [])
.config(function($stateProvider) {
  $stateProvider
  //库存Tab
  .state('app.inventory', {
    url: 'inventory',
    views: {
      'menuContent': {
        templateUrl: 'templates/inventory/tab-search.html',
        controller: 'InventoryCtrl'
      }
    }
  })
    //全部库存
    .state('app.inventory-all', {
      url: 'inventory/all',
      views: {
        'menuContent': {
          templateUrl: 'templates/inventory/list.html',
          controller: 'InventoryAllCtrl'
        }
      }
    })
    //库存警报
    .state('app.inventory-alarm', {
      url: 'inventory/alarm',
      views: {
        'menuContent': {
          templateUrl: 'templates/inventory/list.html',
          controller: 'InventoryAlarmCtrl'
        }
      }
    })
    //品牌列表
    .state('app.brand-list', {
      url: 'inventory/brand-list',
      views: {
        'menuContent': {
          templateUrl: 'templates/inventory/brand-list.html',
          controller: 'BrandListCtrl'
        }
      }
    })
    //品牌库存
    .state('app.brand-inventory', {
      url: 'inventory/brand-:brandName',
      views: {
        'menuContent': {
          templateUrl: 'templates/inventory/list.html',
          controller: 'BrandInventoryCtrl'
        }
      }
    })
    //单品库存分布
    .state('app.inventory-detail', {
      url: 'inventory/detail-:_id',
      views: {
        'menuContent': {
          templateUrl: 'templates/inventory/detail.html',
          controller: 'InventoryDetailCtrl'
        }
      }
    });
});
